export default {
    LoginByUsername({ commit }, userInfo) {
        return new Promise((resolve, reject) => {
            axios.post("/shop/checkUserLogin",{
                username:userInfo.username,
                password:userInfo.password
                }).then(res => {
                  if(res.data.token){
                    commit('SET_TOKEN', res.data.token)
                    resolve()
                  }else{
                    reject()
                  }
        })
      });
    }
}